package com.peakmain.wanandroid.mymodule.adapter;

import android.content.Context;

import com.peakmain.baselibrary.recyclerview.adapter.CommonRecyclerAdapter;
import com.peakmain.baselibrary.recyclerview.adapter.ViewHolder;
import com.peakmain.baselibrary.recyclerview.loader.GlideImageLoader;
import com.peakmain.minemodule.R;
import com.peakmain.wanandroid.netmodule.bean.gank.GankImageBean;

import java.util.List;

/**
 * author: peakmain
 * createdata：2019/7/26
 * mail: 2726449200@qq.com
 * desiption:
 */
public class GankImageAdapter extends CommonRecyclerAdapter<GankImageBean> {
    public GankImageAdapter(Context context, List<GankImageBean> data) {
        super(context, data, R.layout.item_gank_meizi);
    }

    @Override
    public void convert(ViewHolder holder, GankImageBean item) {
        holder.setImageByUrl(R.id.iv_meizhi, new GlideImageLoader(item.getUrl()));
        holder.setText(R.id.tv_meizhi_title, item.getWho());

    }
}
